package com.qst.repository;

import com.qst.pojo.entity.UserNotificationSettings;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * 用户通知设置Repository
 */
@Repository
public interface UserNotificationSettingsRepository extends JpaRepository<UserNotificationSettings, Integer> {
    
    /**
     * 根据用户ID查找通知设置
     * @param userId 用户ID
     * @return 通知设置
     */
    Optional<UserNotificationSettings> findByUserId(Integer userId);
    
    /**
     * 删除用户的通知设置
     * @param userId 用户ID
     */
    void deleteByUserId(Integer userId);
}

